home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!aplcen!haven!decuac!decwrl!shelby!riacs!agate!bionet!ames!sun-barr!newstop!sun!maui.fx.com
- From: mikew@maui.fx.com (Mike Wexler)
- Newsgroups: comp.sources.x
- Subject: v07i086: sm - a session manager, Patch1, Part01/01
- Message-ID: <136541@sun.Eng.Sun.COM>
- Date: 1 Jun 90 22:22:45 GMT
- Sender: news@sun.Eng.Sun.COM
- Lines: 819
- Approved: argv@sun.com
-
- Submitted-by: mikew@maui.fx.com (Mike Wexler)
- Posting-number: Volume 7, Issue 86
- Archive-name: sm/patch1
- Patch-To: sm: Volume 7, Issue 78, 79
-
- Here is the first patch to the version of SM that I just posted to
- comp.sources.x here are the highlights:
- 1. Fixed bug where pressing Save State while the state was being saved
- caused a core dump.
- 2. Fixed several incompatibilities with ANSI C.
- 3. Ported to SGI.
- 4. Changed confirmation stuff to a dialog widget.
- 5. Added fallback resources so when the resource file can't be found, the
- problem is more obvious.
- 6. Changed the confirmPopup from a vendorShell to a transientShell.
- 7. Added a strdup function for those systems that don't have one.
-
- After you apply the patch, you should delete these files, PropUtils.h
- and xdefs.h.
-
- *** R4+/PatchLevel.h Fri Jun 1 12:38:13 1990
- --- ./PatchLevel.h Fri Jun 1 13:05:07 1990
- ***************
- *** 24,28 ****
-
- ******************************************************************/
-
- ! #define PATCHLEVEL 4
- #define VERSION 4.0
- --- 24,28 ----
-
- ******************************************************************/
-
- ! #define PATCHLEVEL 5
- #define VERSION 4.0
- *** R4+/Actions.c Fri Jun 1 12:38:24 1990
- --- ./Actions.c Fri Jun 1 12:45:18 1990
- ***************
- *** 1,6 ****
- /***********************************************************
-
- ! $Header: Actions.c,v 1.1 90/04/16 15:55:02 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- --- 1,6 ----
- /***********************************************************
-
- ! $Header: Actions.c,v 1.2 90/05/25 11:42:35 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- ***************
- *** 85,96 ****
- String *params; /* params from the translation table */
- Cardinal *numParams; /* the number of params */
- {
- ! State state;
-
- StateInit(&state);
- if (StateGet(&state, XtDisplay(homeForm)) >= 0)
- (void) StateSave(&state);
- StateCleanup(&state);
- }
-
- /* ARGSUSED */
- --- 85,102 ----
- String *params; /* params from the translation table */
- Cardinal *numParams; /* the number of params */
- {
- ! State state;
- ! static Bool inProcess = False;
-
- + if (inProcess)
- + return;
- + inProcess = True;
- StateInit(&state);
- if (StateGet(&state, XtDisplay(homeForm)) >= 0)
- (void) StateSave(&state);
- StateCleanup(&state);
- + inProcess = False;
- + return;
- }
-
- /* ARGSUSED */
- *** R4+/ICC.h Fri Jun 1 12:38:12 1990
- --- ./ICC.h Fri Jun 1 12:46:08 1990
- ***************
- *** 1,6 ****
- /***********************************************************
-
- ! $Header: ICC.h,v 3.0 89/11/20 09:24:42 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- --- 1,6 ----
- /***********************************************************
-
- ! $Header: ICC.h,v 3.1 90/06/01 12:48:35 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- ***************
- *** 29,32 ****
- Window icon;
- } WM_STATE;
-
- - #define WithdrawnState 0
- --- 29,31 ----
- *** R4+/ICCUtils.c Fri Jun 1 12:38:12 1990
- --- ./ICCUtils.c Wed May 30 10:39:12 1990
- ***************
- *** 1,6 ****
- /***********************************************************
-
- ! $Header: ICCUtils.c,v 3.1 90/04/16 16:39:28 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- --- 1,6 ----
- /***********************************************************
-
- ! $Header: ICCUtils.c,v 3.2 90/05/30 10:41:39 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- ***************
- *** 32,38 ****
- #include "Atoms.h"
- #include "ICC.h"
- #include "ICCUtils.h"
- - #include "xdefs.h"
- #include "WinInfo.h"
- #include "State.h"
-
- --- 32,37 ----
- ***************
- *** 94,100 ****
- /* do a zero length append to WM_PROTOCOLS to get a time stamp. */
- XSelectInput(display, window, PropertyChangeMask);
- XChangeProperty(display, window, wmProtocolsAtom, XA_ATOM, 32,
- ! PropModeAppend, data, 0);
- for (;;) {
- XtAppNextEvent(myAppContext, &event);
- if (event.type == PropertyNotify && pEvent->window == window &&
- --- 93,99 ----
- /* do a zero length append to WM_PROTOCOLS to get a time stamp. */
- XSelectInput(display, window, PropertyChangeMask);
- XChangeProperty(display, window, wmProtocolsAtom, XA_ATOM, 32,
- ! PropModeAppend, (unsigned char *) data, 0);
- for (;;) {
- XtAppNextEvent(myAppContext, &event);
- if (event.type == PropertyNotify && pEvent->window == window &&
- ***************
- *** 119,127 ****
- Window window; /* the window to be checked */
- Atom protocol; /* protocol to check for */
- {
- ! int i;
- ! Atom *protocols;
- ! unsigned long numProtocols;
-
- protocols = NULL;
- /* Get the WM_PROTOCOLS property on the clients top-level window. */
- --- 118,126 ----
- Window window; /* the window to be checked */
- Atom protocol; /* protocol to check for */
- {
- ! int i;
- ! Atom *protocols;
- ! long numProtocols;
-
- protocols = NULL;
- /* Get the WM_PROTOCOLS property on the clients top-level window. */
- ***************
- *** 164,170 ****
- XSelectInput(display, window, PropertyChangeMask);
-
- if ((cc = XSendEvent(display, window, False, NoEventMask,
- ! &saveYourselfMessage)) != 1) {
- Warning("SaveYourself", "XSendEvent failed to send client message.\n");
- return (cc);
- }
- --- 163,169 ----
- XSelectInput(display, window, PropertyChangeMask);
-
- if ((cc = XSendEvent(display, window, False, NoEventMask,
- ! (XEvent *) &saveYourselfMessage)) != 1) {
- Warning("SaveYourself", "XSendEvent failed to send client message.\n");
- return (cc);
- }
- ***************
- *** 183,189 ****
- State *state; /* anchor for the list of windows */
- {
- Window rootWindow, *childList, parentWindow;
- ! int childListLen;
- WinInfo *wi;
- int i;
-
- --- 182,188 ----
- State *state; /* anchor for the list of windows */
- {
- Window rootWindow, *childList, parentWindow;
- ! unsigned int childListLen;
- WinInfo *wi;
- int i;
-
- *** R4+/Imakefile Fri Jun 1 12:38:26 1990
- --- ./Imakefile Fri Jun 1 12:48:01 1990
- ***************
- *** 1,7 ****
- PROGRAMS = sm
- SM_DIR = $(LIBDIR)/sm
- DEFINES = -DSM_DIR=\"${SM_DIR}\"
- ! SYS_LIBRARIES = -lXaw -lXt -lXmu -lX11
- SRCS = Actions.c Atoms.c Globals.c \
- ICCUtils.c PropUtils.c SM.c \
- StateMisc.c StateGet.c StateExecute.c StateRead.c \
- --- 1,7 ----
- PROGRAMS = sm
- SM_DIR = $(LIBDIR)/sm
- DEFINES = -DSM_DIR=\"${SM_DIR}\"
- ! LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
- SRCS = Actions.c Atoms.c Globals.c \
- ICCUtils.c PropUtils.c SM.c \
- StateMisc.c StateGet.c StateExecute.c StateRead.c \
- *** R4+/Makefile Fri Jun 1 12:38:27 1990
- --- ./Makefile Wed May 30 12:59:46 1990
- ***************
- *** 228,234 ****
- PROGRAMS = sm
- SM_DIR = $(LIBDIR)/sm
- DEFINES = -DSM_DIR=\"${SM_DIR}\"
- ! SYS_LIBRARIES = -lXaw -lXt -lXmu -lX11
- SRCS = Actions.c Atoms.c Globals.c \
- ICCUtils.c PropUtils.c SM.c \
- StateMisc.c StateGet.c StateExecute.c StateRead.c \
- --- 228,234 ----
- PROGRAMS = sm
- SM_DIR = $(LIBDIR)/sm
- DEFINES = -DSM_DIR=\"${SM_DIR}\"
- ! LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
- SRCS = Actions.c Atoms.c Globals.c \
- ICCUtils.c PropUtils.c SM.c \
- StateMisc.c StateGet.c StateExecute.c StateRead.c \
- *** R4+/PropUtils.c Fri Jun 1 12:38:14 1990
- --- ./PropUtils.c Wed May 30 10:39:55 1990
- ***************
- *** 1,6 ****
- /***********************************************************
-
- ! $Header: PropUtils.c,v 3.0 89/11/20 09:25:06 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- --- 1,6 ----
- /***********************************************************
-
- ! $Header: PropUtils.c,v 3.1 90/05/30 10:42:21 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- ***************
- *** 29,36 ****
- #include <X11/Xatom.h>
- #include "X11/Xutil.h"
- #include "ICC.h"
- - #include "xdefs.h"
- - #include "PropUtils.h"
- #include "Atoms.h"
-
- /*
- --- 29,34 ----
- ***************
- *** 48,54 ****
- unsigned char **windowName; /* window name(ISO Latin 1) */
- unsigned char **iconName; /* icon name (ISO Latin 1) */
- Pixmap *iconPixmap; /* icon pixmap */
- ! unsigned char ***argv; /* command line argument list */
- int *argc; /* number of command line arguments */
- XSizeHints *hints; /* WM_NORMAL_HINTS */
- unsigned char **clientMachine; /* WM_CLIENT_MACHINE */
- --- 46,52 ----
- unsigned char **windowName; /* window name(ISO Latin 1) */
- unsigned char **iconName; /* icon name (ISO Latin 1) */
- Pixmap *iconPixmap; /* icon pixmap */
- ! char ***argv; /* command line argument list */
- int *argc; /* number of command line arguments */
- XSizeHints *hints; /* WM_NORMAL_HINTS */
- unsigned char **clientMachine; /* WM_CLIENT_MACHINE */
- ***************
- *** 65,71 ****
- else {
- *clientMachine = NULL;
- if (textProperty.value)
- ! XFree(textProperty.value);
- }
- XGetWMNormalHints(display, window, hints, &supplied);
- XGetWMName(display, window, &textProperty);
- --- 63,69 ----
- else {
- *clientMachine = NULL;
- if (textProperty.value)
- ! XFree((char *) textProperty.value);
- }
- XGetWMNormalHints(display, window, hints, &supplied);
- XGetWMName(display, window, &textProperty);
- ***************
- *** 74,80 ****
- else {
- *windowName = NULL;
- if (textProperty.value)
- ! XFree(textProperty.value);
- }
- return (1);
- }
- --- 72,78 ----
- else {
- *windowName = NULL;
- if (textProperty.value)
- ! XFree((char *) textProperty.value);
- }
- return (1);
- }
- *** R4+/SM.ad Fri Jun 1 12:38:26 1990
- --- ./SM.ad Fri Jun 1 12:48:36 1990
- ***************
- *** 29,54 ****
- <Btn1Up>: notify()unset()saveState()\n
- SM.homeForm.saveStateButton.fromHoriz: quitButton
-
- - SM.confirmPopup.geometry: 174x80+500+400
- -
- SM.confirmPopup.confirmForm.borderWidth: 0
-
- ! SM.confirmPopup.confirmForm.confirmLabel.label: Save State?
- ! SM.confirmPopup.confirmForm.confirmLabel.borderWidth: 0
-
- - SM.confirmPopup.confirmForm.exitYesButton.fromVert: confirmLabel
- SM.confirmPopup.confirmForm.exitYesButton.label: Yes
- SM.confirmPopup.confirmForm.exitYesButton.translations:#override \
- <Btn1Up>: notify()unset()saveState()exit()\n
-
- - SM.confirmPopup.confirmForm.exitNoButton.fromHoriz: exitYesButton
- - SM.confirmPopup.confirmForm.exitNoButton.fromVert: confirmLabel
- SM.confirmPopup.confirmForm.exitNoButton.label: No
- SM.confirmPopup.confirmForm.exitNoButton.translations:#override \
- <Btn1Up>: notify()unset()exit()\n
-
- - SM.confirmPopup.confirmForm.cancelButton.fromHoriz: exitNoButton
- - SM.confirmPopup.confirmForm.cancelButton.fromVert: confirmLabel
- SM.confirmPopup.confirmForm.cancelButton.label: Cancel
- SM.confirmPopup.confirmForm.cancelButton.translations:#override \
- <Btn1Up>: notify()unset()cancel()\n
- --- 29,46 ----
- <Btn1Up>: notify()unset()saveState()\n
- SM.homeForm.saveStateButton.fromHoriz: quitButton
-
- SM.confirmPopup.confirmForm.borderWidth: 0
-
- ! SM.confirmPopup.confirmForm*label: Save State?
-
- SM.confirmPopup.confirmForm.exitYesButton.label: Yes
- SM.confirmPopup.confirmForm.exitYesButton.translations:#override \
- <Btn1Up>: notify()unset()saveState()exit()\n
-
- SM.confirmPopup.confirmForm.exitNoButton.label: No
- SM.confirmPopup.confirmForm.exitNoButton.translations:#override \
- <Btn1Up>: notify()unset()exit()\n
-
- SM.confirmPopup.confirmForm.cancelButton.label: Cancel
- SM.confirmPopup.confirmForm.cancelButton.translations:#override \
- <Btn1Up>: notify()unset()cancel()\n
- *** R4+/SM.h Fri Jun 1 12:38:15 1990
- --- ./SM.h Wed May 30 12:01:56 1990
- ***************
- *** 1,6 ****
- /***********************************************************
-
- ! $Header: SM.h,v 3.1 90/04/16 17:20:59 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- --- 1,6 ----
- /***********************************************************
-
- ! $Header: SM.h,v 3.4 90/05/30 12:04:22 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- ***************
- *** 56,59 ****
- --- 56,61 ----
- extern void Warning();
- extern void PWarning();
- extern void Usage();
- + #if !defined(__STDC__) && !defined(sgi)
- extern char *strdup();
- + #endif
- *** R4+/StateGet.c Fri Jun 1 12:38:17 1990
- --- ./StateGet.c Wed May 30 10:41:44 1990
- ***************
- *** 1,6 ****
- /***********************************************************
-
- ! $Header: StateGet.c,v 3.1 90/04/16 17:19:06 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- --- 1,6 ----
- /***********************************************************
-
- ! $Header: StateGet.c,v 3.3 90/05/30 10:44:14 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- ***************
- *** 31,39 ****
- #include <X11/Xutil.h>
- #include <X11/Xatom.h>
-
- - #include "xdefs.h"
- #include "Top.h"
- - #include "PropUtils.h"
- #include "ICCUtils.h"
- #include "WinInfo.h"
- #include "State.h"
- --- 31,37 ----
- ***************
- *** 122,128 ****
- if (event.type == PropertyNotify && pEvent->atom == XA_WM_COMMAND) {
- wi = StateGetWinInfoByRid(state, pEvent->window);
- if (wi && wi->saveYourselfState == Saving) {
- ! if (XGetCommand(display, wi->rid, &wi->argv, &wi->argc) != 1) {
- StateRemoveWinInfo(state, wi);
- wiFree(wi);
- }
- --- 120,127 ----
- if (event.type == PropertyNotify && pEvent->atom == XA_WM_COMMAND) {
- wi = StateGetWinInfoByRid(state, pEvent->window);
- if (wi && wi->saveYourselfState == Saving) {
- ! if (XGetCommand(display, wi->rid, (char ***) &wi->argv,
- ! &wi->argc) != 1) {
- StateRemoveWinInfo(state, wi);
- wiFree(wi);
- }
- ***************
- *** 130,138 ****
- wi->saveYourselfState = Saved;
- state->waitForCount--;
- }
- }
- XtDispatchEvent(&event);
- - XSelectInput(display, wi->rid, NoEventMask);
- }
- return (SM_SUCCESS);
- }
- --- 129,137 ----
- wi->saveYourselfState = Saved;
- state->waitForCount--;
- }
- + XSelectInput(display, wi->rid, NoEventMask);
- }
- XtDispatchEvent(&event);
- }
- return (SM_SUCCESS);
- }
- ***************
- *** 223,235 ****
- XGetWindowAttributes(display, wi->rid, &attr);
- XGetWindowAttributes(display, wi->parentRid, &parentAttr);
- if (XGetStandardProperties(display, wi->rid, &wmName, &wmIconName,
- ! &iconPixmap, &wi->argc, &wi->argv,
- &wmNormalHints, &wi->wmClientMachine) != 1)
- return (SM_FAILURE);
- ComputeGeometry(&attr, &parentAttr, &wmNormalHints,
- &wi->x, &wi->y, &wi->height, &wi->width);
- if (wmIconName)
- ! XFree(wmIconName);
- /* If the guy doesn't have a WM_COMMAND property, we can't restart him. */
- if (!wi->argv != NULL || !wi->argv[0]) {
- if (!wmName)
- --- 222,234 ----
- XGetWindowAttributes(display, wi->rid, &attr);
- XGetWindowAttributes(display, wi->parentRid, &parentAttr);
- if (XGetStandardProperties(display, wi->rid, &wmName, &wmIconName,
- ! &iconPixmap, &wi->argc, (char ***) &wi->argv,
- &wmNormalHints, &wi->wmClientMachine) != 1)
- return (SM_FAILURE);
- ComputeGeometry(&attr, &parentAttr, &wmNormalHints,
- &wi->x, &wi->y, &wi->height, &wi->width);
- if (wmIconName)
- ! XFree((char *) wmIconName);
- /* If the guy doesn't have a WM_COMMAND property, we can't restart him. */
- if (!wi->argv != NULL || !wi->argv[0]) {
- if (!wmName)
- ***************
- *** 239,245 ****
- wi->argc = 1;
- }
- if (wmName)
- ! XFree(wmName);
- (void) XGetClassHint(display, wi->rid, &wi->wmClass);
- if ( XGetWMState(display, wi->rid, &wi->wmState) != 1)
- return (SM_FAILURE);
- --- 238,244 ----
- wi->argc = 1;
- }
- if (wmName)
- ! XFree((char *) wmName);
- (void) XGetClassHint(display, wi->rid, &wi->wmClass);
- if ( XGetWMState(display, wi->rid, &wi->wmState) != 1)
- return (SM_FAILURE);
- *** R4+/StateRead.c Fri Jun 1 12:38:23 1990
- --- ./StateRead.c Fri Jun 1 12:47:00 1990
- ***************
- *** 1,6 ****
- /***********************************************************
-
- ! $Header: StateRead.c,v 1.1 90/04/16 17:20:22 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- --- 1,6 ----
- /***********************************************************
-
- ! $Header: StateRead.c,v 1.2 90/06/01 12:49:30 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- ***************
- *** 126,132 ****
- }
- done:
- *p = 0;
- ! *result = (unsigned char *) XtMalloc(p - temp + 1);
- strcpy(*result, temp);
- return(cc);
- }
- --- 126,132 ----
- }
- done:
- *p = 0;
- ! *result = (unsigned char *) XtMalloc((char *) (p - temp + 1));
- strcpy(*result, temp);
- return(cc);
- }
- ***************
- *** 285,292 ****
- --- 285,294 ----
- char *file;
- {
- struct passwd *pw;
- + #ifndef FUNCPROTO
- int endpwent();
- struct passwd *getpwuid();
- + #endif
- char *home;
- static char path[256];
-
- *** R4+/StateSave.c Fri Jun 1 12:38:19 1990
- --- ./StateSave.c Fri Jun 1 12:47:17 1990
- ***************
- *** 1,6 ****
- /***********************************************************
-
- ! $Header: StateSave.c,v 3.1 90/04/16 17:20:04 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- --- 1,6 ----
- /***********************************************************
-
- ! $Header: StateSave.c,v 3.2 90/06/01 12:49:49 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- ***************
- *** 31,39 ****
- #include <X11/Xutil.h>
- #include <X11/Xatom.h>
-
- - #include "xdefs.h"
- #include "Top.h"
- - #include "PropUtils.h"
- #include "ICCUtils.h"
- #include "WinInfo.h"
- #include "State.h"
- --- 31,37 ----
- *** R4+/TODO Fri Jun 1 12:38:08 1990
- --- ./TODO Fri Jun 1 10:29:52 1990
- ***************
- *** 1,3 ****
- --- 1,5 ----
- + 0. Create a NullString define that is defined as ((char *) 0)
- +
- 1. Create a better way of starting remote clients.
- [If anyone has any idea or code on how to start clients on a remote machine
- that is portable, please let me know. -mcw]
- ***************
- *** 35,37 ****
- --- 37,43 ----
- was started by sm.
-
- 14. Implement a display state function that displays the current state.
- +
- + 15. Add a resource to control the default path on the remote machine. This
- + is very important for people who use sh and its derivatives since these
- + shells won't set the path automatically when rsh is executed.
- *** R4+/Top.c Fri Jun 1 12:38:19 1990
- --- ./Top.c Wed May 30 10:41:11 1990
- ***************
- *** 1,6 ****
- /***********************************************************
-
- ! $Header: Top.c,v 3.1 90/04/16 17:20:44 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- --- 1,6 ----
- /***********************************************************
-
- ! $Header: Top.c,v 3.2 90/05/30 10:43:36 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- ***************
- *** 30,36 ****
- #include <X11/Shell.h>
- #include <X11/Xaw/Command.h>
- #include <X11/Xaw/Form.h>
- ! #include <X11/Vendor.h>
-
- #include "ICC.h"
- #include "Top.h"
- --- 30,36 ----
- #include <X11/Shell.h>
- #include <X11/Xaw/Command.h>
- #include <X11/Xaw/Form.h>
- ! #include <X11/Xaw/Dialog.h>
-
- #include "ICC.h"
- #include "Top.h"
- ***************
- *** 72,77 ****
- --- 72,86 ----
- XtOffset(ApplicationDataPtr, metaChars), XtRString, "*#\"\\"},
- };
-
- + static char *fallbackResources[] = {
- + "SM.homeForm.quitButton.translations: #override \\n <Btn1Up>: exit()",
- + "SM.homeForm.quitButton.Label: Quit",
- + "SM.homeForm.saveStateButton.sensitive: FALSE",
- + "SM.homeForm.saveStateButton.fromHoriz: quitButton",
- + "SM.homeForm.saveStateButton.Label: No app-defaults file found",
- + NULL,
- + };
- +
- /*
- * Description: Create the top-level widgets.
- *
- ***************
- *** 110,119 ****
- Widget exitNoButton;
- Widget cancelButton;
-
- ! confirmPopup = XtCreatePopupShell("confirmPopup", vendorShellWidgetClass,
- parent, NULL, 0);
-
- ! confirmForm = XtCreateManagedWidget("confirmForm", formWidgetClass,
- confirmPopup,
- NULL, 0);
-
- --- 119,129 ----
- Widget exitNoButton;
- Widget cancelButton;
-
- ! confirmPopup = XtCreatePopupShell("confirmPopup",
- ! transientShellWidgetClass,
- parent, NULL, 0);
-
- ! confirmForm = XtCreateManagedWidget("confirmForm", dialogWidgetClass,
- confirmPopup,
- NULL, 0);
-
- ***************
- *** 153,159 ****
- n = 0;
- topShell = XtAppInitialize(&myAppContext, "SM",
- options, XtNumber(options),
- ! &argc, argv, NULL, args, n);
- if (argc != 1)
- Usage();
- XtGetApplicationResources(topShell, (XtPointer) &applData, tsResources,
- --- 163,169 ----
- n = 0;
- topShell = XtAppInitialize(&myAppContext, "SM",
- options, XtNumber(options),
- ! &argc, argv, fallbackResources, args, n);
- if (argc != 1)
- Usage();
- XtGetApplicationResources(topShell, (XtPointer) &applData, tsResources,
- *** R4+/Utils.c Fri Jun 1 12:38:20 1990
- --- ./Utils.c Wed May 30 12:01:24 1990
- ***************
- *** 1,6 ****
- /***********************************************************
-
- ! $Header: Utils.c,v 3.1 90/04/16 17:20:41 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- --- 1,6 ----
- /***********************************************************
-
- ! $Header: Utils.c,v 3.2 90/05/30 12:03:52 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- ***************
- *** 100,102 ****
- --- 100,116 ----
- return(SM_SUCCESS);
- }
-
- + #if !defined(__STDC__) && !defined(sgi)
- + char *
- + strdup(str)
- + char *str;
- + {
- + char *dup;
- +
- + dup = malloc(strlen(str) + 1);
- + if (dup == NULL)
- + return (NULL);
- + strcpy(dup, str);
- + return(dup);
- + }
- + #endif
- *** R4+/WinInfo.c Fri Jun 1 12:38:21 1990
- --- ./WinInfo.c Wed May 30 13:00:50 1990
- ***************
- *** 1,6 ****
- /***********************************************************
-
- ! $Header: WinInfo.c,v 3.0 89/11/20 09:25:45 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
- and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
- --- 1,6 ----
- /***********************************************************
-
- ! $Header: WinInfo.c,v 3.1 90/05/30 13:03:15 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
- and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
- ***************
- *** 64,70 ****
- wiFree(winInfo)
- WinInfoPtr winInfo; /* pointer to the WinInfo structure to free */
- {
- ! XtFree(winInfo);
- return (SM_SUCCESS);
- }
-
- --- 64,70 ----
- wiFree(winInfo)
- WinInfoPtr winInfo; /* pointer to the WinInfo structure to free */
- {
- ! XtFree((char *) winInfo);
- return (SM_SUCCESS);
- }
-
- *** R4+/osdefs.h Fri Jun 1 12:38:25 1990
- --- ./osdefs.h Wed May 30 10:40:39 1990
- ***************
- *** 1,6 ****
- /***********************************************************
-
- ! $Header: osdefs.h,v 3.0 89/11/20 09:25:48 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- --- 1,6 ----
- /***********************************************************
-
- ! $Header: osdefs.h,v 3.2 90/05/30 10:43:00 mikew Exp $
-
- Copyright 1989 by Mike Wexler, Santa Clara, Ca.
-
- ***************
- *** 24,36 ****
-
- ******************************************************************/
-
- ! extern int exit();
- ! extern int fprintf();
- extern char *sprintf();
- - extern int perror();
- - extern int gethostname();
- - extern int fclose();
- - extern int getuid();
- extern char *getenv();
- ! extern int access();
- ! extern int system();
- --- 24,30 ----
-
- ******************************************************************/
-
- ! #ifndef FUNCPROTO
- extern char *sprintf();
- extern char *getenv();
- ! #endif
-
- dan
- ----------------------------------------------------
- O'Reilly && Associates argv@sun.com / argv@ora.com
- Opinions expressed reflect those of the author only.
-